<tagLib name="cx,html" />
<script language="javascript">
ROOT = '__ROOT__';

function changeTheme(template,$info)
{
	$('#current').attr('src','{:BLOG_PATH}/Tpl/'+template+'/screenshot.png');
	$('#template').html(template);
	$('#default').attr('value',template);
	$('#info').html($info);
}
</script>
<style>
#content dl
{
	float:left;
    height:250px;
    margin:0px 5px 0px 5px;
    padding:0;
    text-align:center;
    width:300px;
}
#content dd 
{
    height:225px;
    margin-left:0;
    position:relative;
}
#content dd div
{
    bottom:0;
    left:0;
    position:absolute;
    width:100%;
}
#content dt
{
	font-size: 15px;
}
</style>
<html:link type="CSS" href="__PUBLIC__/Js/thickbox/thickbox.css" />
<html:link type="JS" href="__PUBLIC__/Js/thickbox/thickbox-compressed.js" />

<div id="box">
<h3>模板管理</h3>
<h4>当前使用模板</h4>
<dl><dd><div><img id="current" src="{:BLOG_PATH}/Tpl/{$user_config.DEFAULT_TEMPLATE}/screenshot.png" /></div></dd><dt id="template">{$user_config.DEFAULT_TEMPLATE}</dt></dl>
<dl><dd><div style="text-align: left;"><p id="info" style="line-height: 20px">{:Input::forShow(file_get_contents(BLOG_PATH."/Tpl/".$user_config['DEFAULT_TEMPLATE']."/readme.txt"))}</p><form method="POST" action="{:url('configTheme')}"><input type="hidden" id="default" name="DEFAULT_TEMPLATE" value="{$user_config.DEFAULT_TEMPLATE}" /><input type="submit" class="btn" value="保存" /></form></div></dd><dt></dt></dl>
<div class="clearfix"></div>
<h4>可选模板</h4>
<volist id="template" name="templateList">
<dl><dd><div><a class="thickbox" href="index.php?KeepThis=true&m=Blog&a=index&{$Think.config.VAR_TEMPLATE}={$template}&preview=1&TB_iframe=true&height=400&width=950" title="模板预览 {$template}" onclick="changeTheme('{$template}','{$template|getTemplateDesrc}')"><img border="0" src="{:BLOG_PATH}/Tpl/{$template}/screenshot.png" /></a></div></dd><dt>{$template}</dt></dl>
</volist>
<div class="clearfix"></div>
</div>
